3.17 \(\int x (a+b \tanh ^{-1}(c x))^2 \, dx\)

Optimal. Leaf size=75 \[ -\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^2}+\frac{1}{2} x^2 \left (a+b \tanh ^{-1}(c x)\right )^2+\frac{a b x}{c}+\frac{b^2 \log \left (1-c^2 x^2\right )}{2 c^2}+\frac{b^2 x \tanh ^{-1}(c x)}{c} \]

[Out]

(a*b*x)/c + (b^2*x*ArcTanh[c*x])/c - (a + b*ArcTanh[c*x])^2/(2*c^2) + (x^2*(a + b*ArcTanh[c*x])^2)/2 + (b^2*Lo
g[1 - c^2*x^2])/(2*c^2)

________________________________________________________________________________________

Rubi [A]  time = 0.114009, antiderivative size = 75, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.417, Rules used = {5916, 5980, 5910, 260, 5948} \[ -\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^2}+\frac{1}{2} x^2 \left (a+b \tanh ^{-1}(c x)\right )^2+\frac{a b x}{c}+\frac{b^2 \log \left (1-c^2 x^2\right )}{2 c^2}+\frac{b^2 x \tanh ^{-1}(c x)}{c} \]

Antiderivative was successfully verified.

[In]

Int[x*(a + b*ArcTanh[c*x])^2,x]

[Out]

(a*b*x)/c + (b^2*x*ArcTanh[c*x])/c - (a + b*ArcTanh[c*x])^2/(2*c^2) + (x^2*(a + b*ArcTanh[c*x])^2)/2 + (b^2*Lo
g[1 - c^2*x^2])/(2*c^2)

Rule 5916

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcT
anh[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTanh[c*x])^(p - 1))/(1 -
 c^2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 5980

Int[(((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Dist[f^2
/e, Int[(f*x)^(m - 2)*(a + b*ArcTanh[c*x])^p, x], x] - Dist[(d*f^2)/e, Int[((f*x)^(m - 2)*(a + b*ArcTanh[c*x])
^p)/(d + e*x^2), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && GtQ[p, 0] && GtQ[m, 1]

Rule 5910

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x])^p, x] - Dist[b*c*p, In
t[(x*(a + b*ArcTanh[c*x])^(p - 1))/(1 - c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 5948

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c*x])^(p
 + 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[c^2*d + e, 0] && NeQ[p, -1]

Rubi steps

\begin{align*} \int x \left (a+b \tanh ^{-1}(c x)\right )^2 \, dx &=\frac{1}{2} x^2 \left (a+b \tanh ^{-1}(c x)\right )^2-(b c) \int \frac{x^2 \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2} \, dx\\ &=\frac{1}{2} x^2 \left (a+b \tanh ^{-1}(c x)\right )^2+\frac{b \int \left (a+b \tanh ^{-1}(c x)\right ) \, dx}{c}-\frac{b \int \frac{a+b \tanh ^{-1}(c x)}{1-c^2 x^2} \, dx}{c}\\ &=\frac{a b x}{c}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^2}+\frac{1}{2} x^2 \left (a+b \tanh ^{-1}(c x)\right )^2+\frac{b^2 \int \tanh ^{-1}(c x) \, dx}{c}\\ &=\frac{a b x}{c}+\frac{b^2 x \tanh ^{-1}(c x)}{c}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^2}+\frac{1}{2} x^2 \left (a+b \tanh ^{-1}(c x)\right )^2-b^2 \int \frac{x}{1-c^2 x^2} \, dx\\ &=\frac{a b x}{c}+\frac{b^2 x \tanh ^{-1}(c x)}{c}-\frac{\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^2}+\frac{1}{2} x^2 \left (a+b \tanh ^{-1}(c x)\right )^2+\frac{b^2 \log \left (1-c^2 x^2\right )}{2 c^2}\\ \end{align*}

Mathematica [A]  time = 0.0623569, size = 90, normalized size = 1.2 \[ \frac{a^2 c^2 x^2+2 a b c x+b (a+b) \log (1-c x)-a b \log (c x+1)+2 b c x \tanh ^{-1}(c x) (a c x+b)+b^2 \left (c^2 x^2-1\right ) \tanh ^{-1}(c x)^2+b^2 \log (c x+1)}{2 c^2} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*ArcTanh[c*x])^2,x]

[Out]

(2*a*b*c*x + a^2*c^2*x^2 + 2*b*c*x*(b + a*c*x)*ArcTanh[c*x] + b^2*(-1 + c^2*x^2)*ArcTanh[c*x]^2 + b*(a + b)*Lo
g[1 - c*x] - a*b*Log[1 + c*x] + b^2*Log[1 + c*x])/(2*c^2)

________________________________________________________________________________________

Maple [B]  time = 0.016, size = 239, normalized size = 3.2 \begin{align*}{\frac{{a}^{2}{x}^{2}}{2}}+{\frac{{x}^{2}{b}^{2} \left ({\it Artanh} \left ( cx \right ) \right ) ^{2}}{2}}+{\frac{{b}^{2}x{\it Artanh} \left ( cx \right ) }{c}}+{\frac{{b}^{2}{\it Artanh} \left ( cx \right ) \ln \left ( cx-1 \right ) }{2\,{c}^{2}}}-{\frac{{b}^{2}{\it Artanh} \left ( cx \right ) \ln \left ( cx+1 \right ) }{2\,{c}^{2}}}+{\frac{{b}^{2} \left ( \ln \left ( cx-1 \right ) \right ) ^{2}}{8\,{c}^{2}}}-{\frac{{b}^{2}\ln \left ( cx-1 \right ) }{4\,{c}^{2}}\ln \left ({\frac{1}{2}}+{\frac{cx}{2}} \right ) }+{\frac{{b}^{2}\ln \left ( cx-1 \right ) }{2\,{c}^{2}}}+{\frac{{b}^{2}\ln \left ( cx+1 \right ) }{2\,{c}^{2}}}-{\frac{{b}^{2}\ln \left ( cx+1 \right ) }{4\,{c}^{2}}\ln \left ( -{\frac{cx}{2}}+{\frac{1}{2}} \right ) }+{\frac{{b}^{2}}{4\,{c}^{2}}\ln \left ( -{\frac{cx}{2}}+{\frac{1}{2}} \right ) \ln \left ({\frac{1}{2}}+{\frac{cx}{2}} \right ) }+{\frac{{b}^{2} \left ( \ln \left ( cx+1 \right ) \right ) ^{2}}{8\,{c}^{2}}}+b{x}^{2}a{\it Artanh} \left ( cx \right ) +{\frac{xab}{c}}+{\frac{ab\ln \left ( cx-1 \right ) }{2\,{c}^{2}}}-{\frac{ab\ln \left ( cx+1 \right ) }{2\,{c}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*arctanh(c*x))^2,x)

[Out]

1/2*a^2*x^2+1/2*x^2*b^2*arctanh(c*x)^2+b^2*x*arctanh(c*x)/c+1/2/c^2*b^2*arctanh(c*x)*ln(c*x-1)-1/2/c^2*b^2*arc
tanh(c*x)*ln(c*x+1)+1/8/c^2*b^2*ln(c*x-1)^2-1/4/c^2*b^2*ln(c*x-1)*ln(1/2+1/2*c*x)+1/2/c^2*b^2*ln(c*x-1)+1/2/c^
2*b^2*ln(c*x+1)-1/4/c^2*b^2*ln(-1/2*c*x+1/2)*ln(c*x+1)+1/4/c^2*b^2*ln(-1/2*c*x+1/2)*ln(1/2+1/2*c*x)+1/8/c^2*b^
2*ln(c*x+1)^2+b*x^2*a*arctanh(c*x)+a*b*x/c+1/2/c^2*a*b*ln(c*x-1)-1/2/c^2*a*b*ln(c*x+1)

________________________________________________________________________________________

Maxima [B]  time = 0.99353, size = 213, normalized size = 2.84 \begin{align*} \frac{1}{2} \, b^{2} x^{2} \operatorname{artanh}\left (c x\right )^{2} + \frac{1}{2} \, a^{2} x^{2} + \frac{1}{2} \,{\left (2 \, x^{2} \operatorname{artanh}\left (c x\right ) + c{\left (\frac{2 \, x}{c^{2}} - \frac{\log \left (c x + 1\right )}{c^{3}} + \frac{\log \left (c x - 1\right )}{c^{3}}\right )}\right )} a b + \frac{1}{8} \,{\left (4 \, c{\left (\frac{2 \, x}{c^{2}} - \frac{\log \left (c x + 1\right )}{c^{3}} + \frac{\log \left (c x - 1\right )}{c^{3}}\right )} \operatorname{artanh}\left (c x\right ) - \frac{2 \,{\left (\log \left (c x - 1\right ) - 2\right )} \log \left (c x + 1\right ) - \log \left (c x + 1\right )^{2} - \log \left (c x - 1\right )^{2} - 4 \, \log \left (c x - 1\right )}{c^{2}}\right )} b^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctanh(c*x))^2,x, algorithm="maxima")

[Out]

1/2*b^2*x^2*arctanh(c*x)^2 + 1/2*a^2*x^2 + 1/2*(2*x^2*arctanh(c*x) + c*(2*x/c^2 - log(c*x + 1)/c^3 + log(c*x -
 1)/c^3))*a*b + 1/8*(4*c*(2*x/c^2 - log(c*x + 1)/c^3 + log(c*x - 1)/c^3)*arctanh(c*x) - (2*(log(c*x - 1) - 2)*
log(c*x + 1) - log(c*x + 1)^2 - log(c*x - 1)^2 - 4*log(c*x - 1))/c^2)*b^2

________________________________________________________________________________________

Fricas [A]  time = 2.23298, size = 269, normalized size = 3.59 \begin{align*} \frac{4 \, a^{2} c^{2} x^{2} + 8 \, a b c x +{\left (b^{2} c^{2} x^{2} - b^{2}\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )^{2} - 4 \,{\left (a b - b^{2}\right )} \log \left (c x + 1\right ) + 4 \,{\left (a b + b^{2}\right )} \log \left (c x - 1\right ) + 4 \,{\left (a b c^{2} x^{2} + b^{2} c x\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )}{8 \, c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctanh(c*x))^2,x, algorithm="fricas")

[Out]

1/8*(4*a^2*c^2*x^2 + 8*a*b*c*x + (b^2*c^2*x^2 - b^2)*log(-(c*x + 1)/(c*x - 1))^2 - 4*(a*b - b^2)*log(c*x + 1)
+ 4*(a*b + b^2)*log(c*x - 1) + 4*(a*b*c^2*x^2 + b^2*c*x)*log(-(c*x + 1)/(c*x - 1)))/c^2

________________________________________________________________________________________

Sympy [A]  time = 1.08891, size = 114, normalized size = 1.52 \begin{align*} \begin{cases} \frac{a^{2} x^{2}}{2} + a b x^{2} \operatorname{atanh}{\left (c x \right )} + \frac{a b x}{c} - \frac{a b \operatorname{atanh}{\left (c x \right )}}{c^{2}} + \frac{b^{2} x^{2} \operatorname{atanh}^{2}{\left (c x \right )}}{2} + \frac{b^{2} x \operatorname{atanh}{\left (c x \right )}}{c} + \frac{b^{2} \log{\left (x - \frac{1}{c} \right )}}{c^{2}} - \frac{b^{2} \operatorname{atanh}^{2}{\left (c x \right )}}{2 c^{2}} + \frac{b^{2} \operatorname{atanh}{\left (c x \right )}}{c^{2}} & \text{for}\: c \neq 0 \\\frac{a^{2} x^{2}}{2} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*atanh(c*x))**2,x)

[Out]

Piecewise((a**2*x**2/2 + a*b*x**2*atanh(c*x) + a*b*x/c - a*b*atanh(c*x)/c**2 + b**2*x**2*atanh(c*x)**2/2 + b**
2*x*atanh(c*x)/c + b**2*log(x - 1/c)/c**2 - b**2*atanh(c*x)**2/(2*c**2) + b**2*atanh(c*x)/c**2, Ne(c, 0)), (a*
*2*x**2/2, True))

________________________________________________________________________________________

Giac [A]  time = 1.21261, size = 163, normalized size = 2.17 \begin{align*} \frac{1}{2} \, a^{2} x^{2} + \frac{1}{8} \,{\left (b^{2} x^{2} - \frac{b^{2}}{c^{2}}\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )^{2} + \frac{a b x}{c} + \frac{1}{2} \,{\left (a b x^{2} + \frac{b^{2} x}{c}\right )} \log \left (-\frac{c x + 1}{c x - 1}\right ) - \frac{{\left (a b - b^{2}\right )} \log \left (c x + 1\right )}{2 \, c^{2}} + \frac{{\left (a b + b^{2}\right )} \log \left (c x - 1\right )}{2 \, c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctanh(c*x))^2,x, algorithm="giac")

[Out]

1/2*a^2*x^2 + 1/8*(b^2*x^2 - b^2/c^2)*log(-(c*x + 1)/(c*x - 1))^2 + a*b*x/c + 1/2*(a*b*x^2 + b^2*x/c)*log(-(c*
x + 1)/(c*x - 1)) - 1/2*(a*b - b^2)*log(c*x + 1)/c^2 + 1/2*(a*b + b^2)*log(c*x - 1)/c^2